<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width">
  <title>Testing MathJax v3 Equation Numbering</title>
  <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
  <script>
  MathJax = {
    tex: {
      tags: 'all'
    }
  };
  </script>
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
  <Style>
  h1 {
    text-align: center;
    background: #CCCCCC;
    padding: .2em 1em;
    border-top: 3px solid #666666;
    border-bottom: 3px solid #999999;
  }
  </style>
</head>
<body>

<div style="padding:0 2em">

<h1>A test of Equation References</h1>

<div style="padding:0 2em">

Here is a labeled equation:
$$x+1\over\sqrt{1-x^2}\label{ref1}$$
with a reference to ref1: \ref{ref1},
and another numbered one with no label:
$$x+1\over\sqrt{1-x^2}$$
This one uses \nonumber:
$$x+1\over\sqrt{1-x^2}\nonumber$$
<p>
<HR>
<p>
Here's one using the equation environment:
\begin{equation}
x+1\over\sqrt{1-x^2}
\end{equation}
and one with equation* environment:
\begin{equation*}
x+1\over\sqrt{1-x^2}
\end{equation*}
<p>
<HR>
<p>
This is a forward reference [\ref{ref2}] and another \eqref{ref2} for the 
following equation:
$$x+1\over\sqrt{1-x^2}\label{ref2}$$
More math:
$$x+1\over\sqrt{1-x^2}$$
Here is a ref inside math: \(\ref{ref2}+1\) and text after it.

\begin{align} 
x& = y_1-y_2+y_3-y_5+y_8-\dots 
&& \text{by \eqref{ref1}}\\ 
& = y'\circ y^* && \text{(by \eqref{ref3})}\\ 
& = y(0) y' && \text {by Axiom 1.} 
\end{align} 

Here's a bad ref [\ref{ref4}] to a nonexistent label.
<p>
<HR>
<p>
An alignment:
\begin{align}
a&=b\label{ref3}\cr
&=c+d
\end{align}
and a starred one:
\begin{align*}
a&=b\cr
&=c+d
\end{align*}

</div>


</body>
</html>